﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test1.aspx.cs" Inherits="Examples_tree_test1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />

    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>

    <script type="text/javascript" src="../../ext-all.js"></script>
    <script type="text/javascript">
        Ext.onReady(function() {
            var tree = new Ext.tree.TreePanel({
                useArrows: true,
                autoScroll: true,
                animate: true,
                enableDD: true,
                containerScroll: true,
                border: false,
                width: 300,
                height: 400,
                root: new Ext.tree.TreeNode({
                    id: 'root',
                    text: '网页查看',
                    draggable: false,  //false默认设置，不能被拖拽
                    expanded: true  //设置菜单展开
                })/**/
            }); //end tree

            tree.root.appendChild(new Ext.tree.TreeNode({
                id: 'node1',
                text: '百度',
                listeners: {
                    'click': function(node, event) {
                        event.stopEvent();
                        window.open('http://www.baidu.com');
                    }
                }

            }));


            tree.render('tree-div');
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
<div id="tree-div" style="overflow:auto; height:300px;width:250px;border:1px solid #c3daf9;"></div>
    </form>
</body>
</html>
